package com.qk.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DeptMapper {
    @Insert("insert into dept(name, status, create_time, update_time) value (#{name},#{status},#{createTime},#{updateTime})")
    void add(Dept dept);

    List<Dept> page(String name,Integer status);

//    @Update("update dept set name = #{name},status = #{status},update_time = #{updateTime} where id = #{id}")
    void update(Dept dept);

    @Select("select * from dept where id = #{id}")
    Dept selectById(Integer id);

    @Delete("delete from dept where id = #{id}")
    void delect(Integer id);

    @Select("select * from dept")
    List<Dept> selectAllDept();
}
